var row =
	{ 
		init : function()
			{
		        this.login = new Ext.form.TextField
		            ({
		                fieldLabel: 'Login',
		                name: 'data[Usuario][login]',
		                allowBlank: false,
		                width: 350
		            });
		        
		        this.senha = new Ext.form.TextField
		            ({
		                fieldLabel: 'Senha',
		                name: 'data[Usuario][senha]',
		                allowBlank: false,
		                width: 350,
						autoCreate:	{tag: 'input', type: 'password'}
		            });
					
				this.captcha =
					{
	                	xtype: 'recaptcha',
						hidden: true,
						style: 'margin-left:84px; padding:10px',
	                    name: 'recaptcha',
	                    id: 'recaptcha_div',
	                    publickey: '6LfbdAEAAAAAAOZkfQulUC0oMHS6Xc2nJG0EQF7s',
	                    theme: 'white',
	                    lang: 'pt'
	                };
				
				formX.buttons[0].text = 'Login';
				formX.buttons = [formX.buttons[0]];
				
				var beforeSubmit = function()
					{
						formX.un('beforeaction', beforeSubmit);
						
						row.senha.setDisabled(true);
						if(formX.items.length === 3)
						{
							formX.add
								(
									new Ext.form.Hidden
										({
											name: 'data[Usuario][senha]',
											value: hex_sha1(hex_sha1(row.senha.getValue())+_PHP_.form.hash)
										}),
									new Ext.form.Hidden
										({
											name: 'data[Usuario][tries]',
											value: 1
										})
								);
							formX.on('afterlayout', function()
								{
									formX.doSubmit();
								});
							formX.doLayout();
						}
						else
						{
							formX.items.get(3).setValue(hex_sha1(hex_sha1(row.senha.getValue())+_PHP_.form.hash));
							formX.items.get(4).setValue(parseInt(formX.items.get(4).getValue()) + 1);
							
							formX.doSubmit();
						}
					};				
				formX.on('beforeaction', beforeSubmit);
				formX.on('success', function(response)
					{
						formX.on('beforeaction', beforeSubmit);
						
						if(parseInt(formX.items.get(4).getValue()) > 2)
						{
							Recaptcha.reload();
							Ext.getCmp(row.captcha.id).show();
						}
						
						row.senha.setValue('');
						row.senha.setDisabled(false);
						
						return true;
					});
				
				formX.keys =
					{
					    key: Ext.EventObject.ENTER,
					    fn: formX.buttons[0].handler
					};
				formX.add(this.login, this.senha, this.captcha);
				formX.render();
			}
	};